package com.demo.hello;

public class HelloWorld {
    private final GreetToUser greetToUser;
    private final GreetAboutTime greetAboutTime;

    public HelloWorld(GreetToUser greetToUser, GreetAboutTime greetAboutTime) {
        this.greetToUser = greetToUser;
        this.greetAboutTime = greetAboutTime;
    }

    /**
     * Say hello to everyone
     * @return the word what to say
     */
    public String sayHello() {
        String  words = greetAboutTime.greet();
        words = greetToUser.greet()+". "+words;
        return words;
    }
}
